home *** CD-ROM | disk | FTP | other *** search
/ Aminet 24 / Aminet 24 (1998)(GTI - Schatztruhe)[!][Apr 1998].iso / Aminet / dev / c / cxref_1_4a.lha / parse-yy.h < prev    next >
C/C++ Source or Header  |  1997-06-21  |  2KB  |  93 lines

  1. /***************************************
  2.   $Header: /home/amb/cxref/RCS/parse-yy.h 1.9 1996/06/11 18:12:41 amb Exp $
  3.  
  4.   C Cross Referencing & Documentation tool. Version 1.2.
  5.  
  6.   The function protypes that are missing from the lex and yacc output.
  7.   ******************/ /******************
  8.   Written by Andrew M. Bishop
  9.  
  10.   This file Copyright 1995,96 Andrew M. Bishop
  11.   It may be distributed under the GNU Public License, version 2, or
  12.   any higher version.  See section COPYING of the GNU Public license
  13.   for conditions under which this file may be redistributed.
  14.   ***************************************/
  15.  
  16. #ifndef PARSE_YY_H
  17. #define PARSE_YY_H   /*+ To stop multiple inclusions. +*/
  18.  
  19. #include <stdio.h>
  20. #include <stdlib.h>
  21.  
  22. /*+ Debugging output or not?
  23.  
  24.   YYDEBUG=0 : No debugging at all, smaller, faster code.
  25.  
  26.   YYDEBUG=1 : Debugging output only when parsing fails.
  27.  
  28.   YYDEBUG=2 : Debugging output for each symbol from lex().
  29.  
  30.   YYDEBUG=3 : Full yacc debugging output, state transitions etc.
  31. +*/
  32. #define YYDEBUG 1
  33.  
  34. /* Only the #define for YYDEBUG above is user editable,
  35.    those below are for fixing up yacc/lex only. */
  36.  
  37. /*+ Semantic type is a char* +*/
  38. #define YYSTYPE char*
  39.  
  40. /*+ use prototypes in function declarations +*/
  41. #define YY_USE_PROTOS
  42.  
  43. /*+ the "const" storage-class-modifier is valid +*/
  44. #define YY_USE_CONST
  45.  
  46. #if YYDEBUG
  47.  
  48. /*+ Turn the debugging output on and off. +*/
  49. extern int yydebug;
  50.  
  51. /*+ Define verbose errors in Bison generated file +*/
  52. #define YYERROR_VERBOSE 1
  53.  
  54. /*+ This is needed in the Bison generated code. +*/
  55. #define xmalloc malloc
  56.  
  57. /*+ Print the semantic value +*/
  58. #define YYPRINT(file,type,value)  printf(" '%s'",value)
  59.  
  60. #endif
  61.  
  62. /* Extern variables */
  63.  
  64. /*+ The name of the current file. +*/
  65. extern char* parse_file;
  66.  
  67. /*+ The current line number in the file. +*/
  68. extern int parse_line;
  69.  
  70. /*+ For communication between the lex and yacc code. +*/
  71. extern YYSTYPE yylval;
  72.  
  73. /*+ For communication between the lex and yacc code. +*/
  74. extern FILE *yyin;
  75.  
  76. /* Global functions */
  77.  
  78. int yylex(void);
  79.  
  80. int yyparse(void);
  81. void yyrestart (FILE *input_file);
  82.  
  83. /* yywrap() function */
  84.  
  85. #ifndef yywrap
  86.  
  87. /*+ Needed in lex but does nothing. +*/
  88. #define yywrap() 1
  89.  
  90. #endif
  91.  
  92. #endif
  93.